import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/login.vue')
  },
  {
    path: '/',
    component: () => import(/* webpackChunkName: "about" */ '../components/Layout.vue'),
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import(/* webpackChunkName: "about" */ '../views/home.vue'),
        meta: {
          title: "首页",
          icon: require("../assets/home.png"),
          iconsel: require("../assets/home_sel.png")
        }
      },
      {
        path: 'videos',
        name: 'videos',
        component: () => import(/* webpackChunkName: "about" */ '../views/videos.vue'),
        meta: {
          title: "视频中心",
          icon: require("../assets/videos.png"),
          iconsel: require("../assets/videos_sel.png")
        }
      },
      {
        path: 'comment',
        name: 'comment',
        component: () => import(/* webpackChunkName: "about" */ '../views/comment.vue'),
        meta: {
          title: "留言板",
          icon: require("../assets/comment.png"),
          iconsel: require("../assets/comment_sel.png")
        }
      },
      {
        path: 'profile',
        name: 'profile',
        component: () => import(/* webpackChunkName: "about" */ '../views/profile.vue'),
        meta: {
          title: "我的",
          icon: require("../assets/profile.png"),
          iconsel: require("../assets/profile_sel.png")
        }
      },
    ]
  },
]

const router = new VueRouter({
  routes,
  linkActiveClass:"active",
})

export default router
